namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：bx_Forums 主键列：ForumID
        /// </summary>
        [SerializableAttribute()]
        public partial class bx_Forums : Entity {
            
            protected Int32 _ForumID;
            
            protected Int32 _ParentID;
            
            protected Int32 _ClubID;
            
            protected Byte _ForumType;
            
            protected Byte _ForumStatus;
            
            protected Byte _ThreadCatalogStatus;
            
            protected String _VisitPaths;
            
            protected String _CodeName;
            
            protected String _ForumName;
            
            protected String _Description;
            
            protected String _Readme;
            
            protected String _LogoSrc;
            
            protected String _ThemeID;
            
            protected Byte _ColumnSpan;
            
            protected Int32 _TotalThreads;
            
            protected Int32 _TotalPosts;
            
            protected Int32 _TodayThreads;
            
            protected Int32 _TodayPosts;
            
            protected Int32 _LastThreadID;
            
            protected Int32 _YestodayLastThreadID;
            
            protected Int32 _YestodayLastPostID;
            
            protected String _Password;
            
            protected Int32 _SortOrder;
            
            protected String _ExtendedAttributes;
            
            public Int32 ForumID {
                get {
                    return this._ForumID;
                }
                set {
                    this.OnPropertyValueChange(_.ForumID, _ForumID, value);
                    this._ForumID = value;
                }
            }
            
            public Int32 ParentID {
                get {
                    return this._ParentID;
                }
                set {
                    this.OnPropertyValueChange(_.ParentID, _ParentID, value);
                    this._ParentID = value;
                }
            }
            
            public Int32 ClubID {
                get {
                    return this._ClubID;
                }
                set {
                    this.OnPropertyValueChange(_.ClubID, _ClubID, value);
                    this._ClubID = value;
                }
            }
            
            public Byte ForumType {
                get {
                    return this._ForumType;
                }
                set {
                    this.OnPropertyValueChange(_.ForumType, _ForumType, value);
                    this._ForumType = value;
                }
            }
            
            public Byte ForumStatus {
                get {
                    return this._ForumStatus;
                }
                set {
                    this.OnPropertyValueChange(_.ForumStatus, _ForumStatus, value);
                    this._ForumStatus = value;
                }
            }
            
            public Byte ThreadCatalogStatus {
                get {
                    return this._ThreadCatalogStatus;
                }
                set {
                    this.OnPropertyValueChange(_.ThreadCatalogStatus, _ThreadCatalogStatus, value);
                    this._ThreadCatalogStatus = value;
                }
            }
            
            public String VisitPaths {
                get {
                    return this._VisitPaths;
                }
                set {
                    this.OnPropertyValueChange(_.VisitPaths, _VisitPaths, value);
                    this._VisitPaths = value;
                }
            }
            
            public String CodeName {
                get {
                    return this._CodeName;
                }
                set {
                    this.OnPropertyValueChange(_.CodeName, _CodeName, value);
                    this._CodeName = value;
                }
            }
            
            public String ForumName {
                get {
                    return this._ForumName;
                }
                set {
                    this.OnPropertyValueChange(_.ForumName, _ForumName, value);
                    this._ForumName = value;
                }
            }
            
            public String Description {
                get {
                    return this._Description;
                }
                set {
                    this.OnPropertyValueChange(_.Description, _Description, value);
                    this._Description = value;
                }
            }
            
            public String Readme {
                get {
                    return this._Readme;
                }
                set {
                    this.OnPropertyValueChange(_.Readme, _Readme, value);
                    this._Readme = value;
                }
            }
            
            public String LogoSrc {
                get {
                    return this._LogoSrc;
                }
                set {
                    this.OnPropertyValueChange(_.LogoSrc, _LogoSrc, value);
                    this._LogoSrc = value;
                }
            }
            
            public String ThemeID {
                get {
                    return this._ThemeID;
                }
                set {
                    this.OnPropertyValueChange(_.ThemeID, _ThemeID, value);
                    this._ThemeID = value;
                }
            }
            
            public Byte ColumnSpan {
                get {
                    return this._ColumnSpan;
                }
                set {
                    this.OnPropertyValueChange(_.ColumnSpan, _ColumnSpan, value);
                    this._ColumnSpan = value;
                }
            }
            
            public Int32 TotalThreads {
                get {
                    return this._TotalThreads;
                }
                set {
                    this.OnPropertyValueChange(_.TotalThreads, _TotalThreads, value);
                    this._TotalThreads = value;
                }
            }
            
            public Int32 TotalPosts {
                get {
                    return this._TotalPosts;
                }
                set {
                    this.OnPropertyValueChange(_.TotalPosts, _TotalPosts, value);
                    this._TotalPosts = value;
                }
            }
            
            public Int32 TodayThreads {
                get {
                    return this._TodayThreads;
                }
                set {
                    this.OnPropertyValueChange(_.TodayThreads, _TodayThreads, value);
                    this._TodayThreads = value;
                }
            }
            
            public Int32 TodayPosts {
                get {
                    return this._TodayPosts;
                }
                set {
                    this.OnPropertyValueChange(_.TodayPosts, _TodayPosts, value);
                    this._TodayPosts = value;
                }
            }
            
            public Int32 LastThreadID {
                get {
                    return this._LastThreadID;
                }
                set {
                    this.OnPropertyValueChange(_.LastThreadID, _LastThreadID, value);
                    this._LastThreadID = value;
                }
            }
            
            public Int32 YestodayLastThreadID {
                get {
                    return this._YestodayLastThreadID;
                }
                set {
                    this.OnPropertyValueChange(_.YestodayLastThreadID, _YestodayLastThreadID, value);
                    this._YestodayLastThreadID = value;
                }
            }
            
            public Int32 YestodayLastPostID {
                get {
                    return this._YestodayLastPostID;
                }
                set {
                    this.OnPropertyValueChange(_.YestodayLastPostID, _YestodayLastPostID, value);
                    this._YestodayLastPostID = value;
                }
            }
            
            public String Password {
                get {
                    return this._Password;
                }
                set {
                    this.OnPropertyValueChange(_.Password, _Password, value);
                    this._Password = value;
                }
            }
            
            public Int32 SortOrder {
                get {
                    return this._SortOrder;
                }
                set {
                    this.OnPropertyValueChange(_.SortOrder, _SortOrder, value);
                    this._SortOrder = value;
                }
            }
            
            public String ExtendedAttributes {
                get {
                    return this._ExtendedAttributes;
                }
                set {
                    this.OnPropertyValueChange(_.ExtendedAttributes, _ExtendedAttributes, value);
                    this._ExtendedAttributes = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<bx_Forums>("bx_Forums");
            }
            
            /// <summary>
            /// 获取实体中的标识列
            /// </summary>
            protected override Field GetIdentityField() {
                return _.ForumID;
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.ForumID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.ForumID,
                        _.ParentID,
                        _.ClubID,
                        _.ForumType,
                        _.ForumStatus,
                        _.ThreadCatalogStatus,
                        _.VisitPaths,
                        _.CodeName,
                        _.ForumName,
                        _.Description,
                        _.Readme,
                        _.LogoSrc,
                        _.ThemeID,
                        _.ColumnSpan,
                        _.TotalThreads,
                        _.TotalPosts,
                        _.TodayThreads,
                        _.TodayPosts,
                        _.LastThreadID,
                        _.YestodayLastThreadID,
                        _.YestodayLastPostID,
                        _.Password,
                        _.SortOrder,
                        _.ExtendedAttributes};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._ForumID,
                        this._ParentID,
                        this._ClubID,
                        this._ForumType,
                        this._ForumStatus,
                        this._ThreadCatalogStatus,
                        this._VisitPaths,
                        this._CodeName,
                        this._ForumName,
                        this._Description,
                        this._Readme,
                        this._LogoSrc,
                        this._ThemeID,
                        this._ColumnSpan,
                        this._TotalThreads,
                        this._TotalPosts,
                        this._TodayThreads,
                        this._TodayPosts,
                        this._LastThreadID,
                        this._YestodayLastThreadID,
                        this._YestodayLastPostID,
                        this._Password,
                        this._SortOrder,
                        this._ExtendedAttributes};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.ForumID))) {
                    this._ForumID = reader.GetInt32(_.ForumID);
                }
                if ((false == reader.IsDBNull(_.ParentID))) {
                    this._ParentID = reader.GetInt32(_.ParentID);
                }
                if ((false == reader.IsDBNull(_.ClubID))) {
                    this._ClubID = reader.GetInt32(_.ClubID);
                }
                if ((false == reader.IsDBNull(_.ForumType))) {
                    this._ForumType = reader.GetByte(_.ForumType);
                }
                if ((false == reader.IsDBNull(_.ForumStatus))) {
                    this._ForumStatus = reader.GetByte(_.ForumStatus);
                }
                if ((false == reader.IsDBNull(_.ThreadCatalogStatus))) {
                    this._ThreadCatalogStatus = reader.GetByte(_.ThreadCatalogStatus);
                }
                if ((false == reader.IsDBNull(_.VisitPaths))) {
                    this._VisitPaths = reader.GetString(_.VisitPaths);
                }
                if ((false == reader.IsDBNull(_.CodeName))) {
                    this._CodeName = reader.GetString(_.CodeName);
                }
                if ((false == reader.IsDBNull(_.ForumName))) {
                    this._ForumName = reader.GetString(_.ForumName);
                }
                if ((false == reader.IsDBNull(_.Description))) {
                    this._Description = reader.GetString(_.Description);
                }
                if ((false == reader.IsDBNull(_.Readme))) {
                    this._Readme = reader.GetString(_.Readme);
                }
                if ((false == reader.IsDBNull(_.LogoSrc))) {
                    this._LogoSrc = reader.GetString(_.LogoSrc);
                }
                if ((false == reader.IsDBNull(_.ThemeID))) {
                    this._ThemeID = reader.GetString(_.ThemeID);
                }
                if ((false == reader.IsDBNull(_.ColumnSpan))) {
                    this._ColumnSpan = reader.GetByte(_.ColumnSpan);
                }
                if ((false == reader.IsDBNull(_.TotalThreads))) {
                    this._TotalThreads = reader.GetInt32(_.TotalThreads);
                }
                if ((false == reader.IsDBNull(_.TotalPosts))) {
                    this._TotalPosts = reader.GetInt32(_.TotalPosts);
                }
                if ((false == reader.IsDBNull(_.TodayThreads))) {
                    this._TodayThreads = reader.GetInt32(_.TodayThreads);
                }
                if ((false == reader.IsDBNull(_.TodayPosts))) {
                    this._TodayPosts = reader.GetInt32(_.TodayPosts);
                }
                if ((false == reader.IsDBNull(_.LastThreadID))) {
                    this._LastThreadID = reader.GetInt32(_.LastThreadID);
                }
                if ((false == reader.IsDBNull(_.YestodayLastThreadID))) {
                    this._YestodayLastThreadID = reader.GetInt32(_.YestodayLastThreadID);
                }
                if ((false == reader.IsDBNull(_.YestodayLastPostID))) {
                    this._YestodayLastPostID = reader.GetInt32(_.YestodayLastPostID);
                }
                if ((false == reader.IsDBNull(_.Password))) {
                    this._Password = reader.GetString(_.Password);
                }
                if ((false == reader.IsDBNull(_.SortOrder))) {
                    this._SortOrder = reader.GetInt32(_.SortOrder);
                }
                if ((false == reader.IsDBNull(_.ExtendedAttributes))) {
                    this._ExtendedAttributes = reader.GetString(_.ExtendedAttributes);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(bx_Forums).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<bx_Forums>();
                
                /// <summary>
                /// 字段名：ForumID - 数据类型：Int32
                /// </summary>
                public static Field ForumID = new Field<bx_Forums>("ForumID");
                
                /// <summary>
                /// 字段名：ParentID - 数据类型：Int32
                /// </summary>
                public static Field ParentID = new Field<bx_Forums>("ParentID");
                
                /// <summary>
                /// 字段名：ClubID - 数据类型：Int32
                /// </summary>
                public static Field ClubID = new Field<bx_Forums>("ClubID");
                
                /// <summary>
                /// 字段名：ForumType - 数据类型：Byte
                /// </summary>
                public static Field ForumType = new Field<bx_Forums>("ForumType");
                
                /// <summary>
                /// 字段名：ForumStatus - 数据类型：Byte
                /// </summary>
                public static Field ForumStatus = new Field<bx_Forums>("ForumStatus");
                
                /// <summary>
                /// 字段名：ThreadCatalogStatus - 数据类型：Byte
                /// </summary>
                public static Field ThreadCatalogStatus = new Field<bx_Forums>("ThreadCatalogStatus");
                
                /// <summary>
                /// 字段名：VisitPaths - 数据类型：String
                /// </summary>
                public static Field VisitPaths = new Field<bx_Forums>("VisitPaths");
                
                /// <summary>
                /// 字段名：CodeName - 数据类型：String
                /// </summary>
                public static Field CodeName = new Field<bx_Forums>("CodeName");
                
                /// <summary>
                /// 字段名：ForumName - 数据类型：String
                /// </summary>
                public static Field ForumName = new Field<bx_Forums>("ForumName");
                
                /// <summary>
                /// 字段名：Description - 数据类型：String
                /// </summary>
                public static Field Description = new Field<bx_Forums>("Description");
                
                /// <summary>
                /// 字段名：Readme - 数据类型：String
                /// </summary>
                public static Field Readme = new Field<bx_Forums>("Readme");
                
                /// <summary>
                /// 字段名：LogoSrc - 数据类型：String
                /// </summary>
                public static Field LogoSrc = new Field<bx_Forums>("LogoSrc");
                
                /// <summary>
                /// 字段名：ThemeID - 数据类型：String
                /// </summary>
                public static Field ThemeID = new Field<bx_Forums>("ThemeID");
                
                /// <summary>
                /// 字段名：ColumnSpan - 数据类型：Byte
                /// </summary>
                public static Field ColumnSpan = new Field<bx_Forums>("ColumnSpan");
                
                /// <summary>
                /// 字段名：TotalThreads - 数据类型：Int32
                /// </summary>
                public static Field TotalThreads = new Field<bx_Forums>("TotalThreads");
                
                /// <summary>
                /// 字段名：TotalPosts - 数据类型：Int32
                /// </summary>
                public static Field TotalPosts = new Field<bx_Forums>("TotalPosts");
                
                /// <summary>
                /// 字段名：TodayThreads - 数据类型：Int32
                /// </summary>
                public static Field TodayThreads = new Field<bx_Forums>("TodayThreads");
                
                /// <summary>
                /// 字段名：TodayPosts - 数据类型：Int32
                /// </summary>
                public static Field TodayPosts = new Field<bx_Forums>("TodayPosts");
                
                /// <summary>
                /// 字段名：LastThreadID - 数据类型：Int32
                /// </summary>
                public static Field LastThreadID = new Field<bx_Forums>("LastThreadID");
                
                /// <summary>
                /// 字段名：YestodayLastThreadID - 数据类型：Int32
                /// </summary>
                public static Field YestodayLastThreadID = new Field<bx_Forums>("YestodayLastThreadID");
                
                /// <summary>
                /// 字段名：YestodayLastPostID - 数据类型：Int32
                /// </summary>
                public static Field YestodayLastPostID = new Field<bx_Forums>("YestodayLastPostID");
                
                /// <summary>
                /// 字段名：Password - 数据类型：String
                /// </summary>
                public static Field Password = new Field<bx_Forums>("Password");
                
                /// <summary>
                /// 字段名：SortOrder - 数据类型：Int32
                /// </summary>
                public static Field SortOrder = new Field<bx_Forums>("SortOrder");
                
                /// <summary>
                /// 字段名：ExtendedAttributes - 数据类型：String
                /// </summary>
                public static Field ExtendedAttributes = new Field<bx_Forums>("ExtendedAttributes");
            }
        }
    }
